
import {
	GET,
	POST,
	POSTJSON,
	PUT,
	DELETE,
	POSTFORM
} from './index'


// 获取 banner列表
const SearchSearchHistory= params => {
	const url = 'Web/Search/SearchHistory.ashx';
	return new Promise(resolve => {
		POSTJSON(url, params).then(res => {
			if (res) {
				if (res.success === true) {
					resolve(res.data)
				}
			}
		})
	})
}

const SearchSearch= params => {
	const url = '/Web/Search/Search.ashx';
	return new Promise(resolve => {
		POSTJSON(url, params).then(res => {
			if (res) {
				if (res.success === true) {
					resolve(res.data)
				}
			}
		})
	})
}

const SearchClear= params => {
	const url = 'Web/Search/SearchClear.ashx';
	return new Promise(resolve => {
		POSTJSON(url, params).then(res => {
			if (res) {
				if (res.success === true) {
					resolve(res.data)
				}
			}
		})
	})
}






module.exports = {
	SearchSearchHistory,
	SearchSearch,
	SearchClear
}